Use o-dom.matches instead of native matches method.
Cherry-picked change o-dom.matches commit from master.