Made the export for Node look for an object

Some libraries (such as angular-mocks) set module to a function, so this is a better safer.