Fix gl stuff

If OpenGL or GLUT are frameworks than they request a special behavior.
This also fixes #353