typeof module not enough

In some testing environments `module` may in-fact be defined in a browser context. I am using karma and mocha, which is currently un-unit-testable because of this overuse of the term `module`. Just adding the extra catch for `module.exports` seems to solve the problem.