Added GL version detection to the build system