Fix Java 8 build