add better support of DOM nodes into equality matcher

Github issue #606