[build] Allow building with JDK8