Fixed a problem in GL version detection