non-node wrapper so xpath.js works in a browser