Some more tweaks to make Ninja build under JDK8.