Fix linking on OSX