fix readlink in Mac OS