Fix compilation with Java 6