[setup] Handle all mac versions > 10.5 the same way

Handle all mac versions > 10.5 the same way, since they provide an utility named java_home to get the current JAVA_HOME. Added a little helper method to check if the given java_home contains a 'jni.h', so it is in fact a valid JDK. Provided a fallback path, if non has been provided and also check it if its a JDK. If nothing helps pretty print errors.