Fix GL configuration fallbacks in context creation

This needs testing on different systems to check that it does what it should.

\cc @Zordey, who reported this bug on IRC.