Make promises work in the browser, too