added better support for node and browserify