safer OpenGL detection