add temporary support for document.contains (until https://github.com/Polymer/ShadowDOM/issues/194 is addressed)