Build: Don't assume the browser environment; smoke test on Node w/ jsdom

Fixes gh-1950
So, just to be sure:
```js
grunt.registerTask( "test", [ "node-smoke-test" ] );
grunt.registerTask( "default", [ "jsonlint", "dev", "uglify", "dist:*", "test", "compare_size" ] );
```
That will mean that `compare_size` won't run if `test` fails. Is that OK?