Autodetect JAVA_HOME on RPM-based systems