(#1591) - handle undefined promise.cancel
(#1591) - fix for native promise libraries