Make link2dir work correctly under Mac OS X