Fix global window.define and update curl