Add support for Java 6