Could consider doing something like this at the end instead:

```js
var oldDefine = self.define;
self.define = function () {...};
self.define.amd = true;
importScripts(url);
self.define = oldDefine;
return exports;
```