adapt the shared lib build to osx