Fix linking on osx