check for module.exports for nodejs environent.

checking for module.exports checks more thoroughly that it is in fact nodejs.  Bugs occur in environments when module exists (angular-mocks specifically).