Fix build on Java 6