Port bug 896797 and bug 912293 from mozilla-central to fix build bustages. rs=build system peer port,a=bustage-fix