configure: add java-8-openjdk and java-7-openjdk as locations for java

This helps some distros (e.g. Archlinux) where openjdk is installed in
java-MAJOR-openjdk directories, without any "default version" symlink.