teximage: split out helper from EGLImageTargetTexture2DOES