Mac: fix target path, fix library path