build: work around missing readlink -f on Mac

Change-Id: I5d56366cf33a2b02f1886c87815d00cff279779d
Merge "build: work around missing readlink -f on Mac" into android-4.3