Added Node.js support

Not published yet. To test Node.js support, QUnit's port can be used with:
qunit -c ./state-machine.js -t ./test/test_*.js