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

Fixes gh-1950
I'd be in favor of running the tests all the time, but that's just me.