Improved extension detection similar to 27ea81a4 and 4df61444.
Fixed a crash with previous commit.
Merge pull request #213 from xycaleth/master

Improved GL extension checking/detection.