Allow compareDocumentPosition to take a raw Node

jQueryUI uses `element.compareDocumentPosition(document.body)` so
we need to allow a non wrapper as the argument here.

Fixes #410