Fix common.sh java version detection