Some GLES compatibility fixes