bundleRelations: Don't rely on node.matchesSelector, which does not work for documents that don't have an <html> element.

See https://github.com/tmpvar/jsdom/issues/555

(cherry picked from commit a2dc2d93f69374cff96b53dd11d661a4293c7978)
Release 1.6.13.