Fix the library extensions for osmesa linking.