change condition of using node export system.

The original condition of using node export system causes error when used with QUnit.

QUnit's 'module' Function is defined globaly. 
So current export logic is malfunctioning.

I change that logic more precise.
Having gone this long without anyone complaining (and my sense is that node has won out), I'd rather not add this API as it effectively makes the API conditional on the environment. If you remove this line I'm fine merging the rest.