Fix build on JDK8