Making API compatible with the gecko 25+ native implementation of promises