Fixing build under JDK8