fix compatibility with opengl on windows