Bug 926043 - Port build system changes from Bug 585016 and Bug 924615 to comm-central, r=jcranmer, a=bustage-fix CLOSED TREE