correctly find JAVA_HOME on OSX