Apply bug 882076 patch: Make Promise usable from C++