Fix JDK8 support.