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

Fixes gh-1950
I'm fine with it, not least of all because it's consistent with Sizzle. And if that changes in the future, it should change everywhere.