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

Fixes gh-1950
Done. I hope I catched them all as we often use a `documentElement` on a different document than `window.document`.

We're done to +28 bytes.