Fixed the OSMesa configure check so that OSMesa won't be linked in if it's