Fixed macro line endings after whitespace was fixed
Use glGetStringi() for extension lookup on OpenGL contexts >= version 3.0.

Fixes Bugzilla #1620.

--HG--
extra : rebase_source : 5fa86e8591bfea85e1adf8a495a7b32c3d5dacd5
The Haiku install location fix needs to get into configure
Patched to compile with older glext.h that don't have GL_NUM_EXTENSIONS.

--HG--
extra : rebase_source : e2ece9401f8f324875930d35c61514920732087b
Fixed Haiku build issue with missing extension support.

The visibility attribute warnings in Haiku gl.h can be fixed by editing gl.h and changing the line:
#elif defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
to
#elif (defined(__GNUC__) && __GNUC__ >= 4) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))

as described in: http://dev.haiku-os.org/ticket/8882