fix 'readlink: illegal option -- f' under darwin.