gl: fix map_to_image() for glesv3 and GL_ANGLE extensions