add condition to export node.js

I found a bug when I use JsDiff with QUnit, JsDiff object is undefined.
this patch make possible to define JsDiff object when 'module' function is defined in browser environment.