Only export JAVA_HOME if present