Fix build for Java 1.7.