Fix linking error on OS X