fix linking for mac