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

Refs gh-1788
If we add `DOMParser` to globals and use it somewhere on the top scope, we'll break Node & other environments that don't have it. That's why I went for explicitly marking places that are browser-only; I think it's safer (and there aren't many of them on `master`).