add window.define to engine.js