build: Allow building with OpenJDK

Change-Id: I6348bc1187240729f75f50d7ef91802c68e7788b
build: work around missing readlink -f on Mac

Change-Id: I5d56366cf33a2b02f1886c87815d00cff279779d
build: Fix zip creation on Mac OSX

When checking if files are symbolic links, then ota_from_target_files
expect the permissions of the file to be 0755 which is always the case
on Linux, but not on Mac OSX. I adapted the function so that permissions
are not included in the check anymore. Instead it uses only the type
attributes of the zip external_attr flags.
CM uses the same kind of check.

Change-Id: I5d5d0567cb798b765cbc19a66661163f80e21f70