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

Fixes gh-1950
This PR also moves out of using most globals by prepending `window.` to them (e.g. for `XMLHttpRequest` & `DOMParser`); this may affect size.