fix building on OSX with proper shared object extension