Fix build on osx

On Mac OS X you can use `/usr/libexec/java_home -v <JAVA_VERSION>` to
get actual JAVA_HOME