Compilation fix for Java 7, also adding JDK8 to build matrix