lib/glesv2: fix ordering and compatibility in uses of glGetActive