work around lack of `readlink -f` on OSX