[Refactor] Build against Java 6.