Fix linkage in OSX