Fix OpenGL compilation errors