Fix #321 Fix build for Java 8