Add function to check for an OpenGL extension.
Fix unittest.