Patches for allowing core to build with trunk