Fix Java 6 build error