fix linking error on OSX