Improved compatibility with older GL versions

- Added ifdefs around functions that require a higher GL version
  than 3.0 in Framebuffer and shape drawing.