Upstream build fixes.