Make a bunch of build fixes.