Fix detection of Oracle Java if OpenJDK is installed