Add back-compatibility for Java 6