properly fix Java 7 dependency