Multiple changes

- Minor updates to GL version detection.
- Added #ifs to sources to disable some features if a required GL version
  is not available.