changes for browserify compatibility
added node test file. changed test for running in node. again.