fixes for OpenGL 2 support