Fix Java 7 dependency