Fix compilation with Java 8