configure: fix OpenGL autodetection on OS X

Was broken from 746b5e6 since the OpenGL headers are under OpenGL/ and not GL/
on OS X. Thanks to @Kovensky for the initial patch.