Fix cross-compilation for Java 1.6