Fix build with Java 7