Fix wrong detection of Java installation