Remove dependency on JDK 7