fix CommonJS problem

```javascript
if (window.module && module.exports) {
  // ...
}
```

These lines of code doesn't work on duojs and component.io. They don't use `module` as a global variable.