Add check for OpenGL version and extensions

Check OpenGL version and available extensions to determine
whether we can use VBO - either from OpenGL core (since version 2.0)
or as ARB extension. It requires conditional compiling, as function
names differ when function is in core and in extension.