Cross browser fixes

Fixes Object.keys(element.validity) issue in Firefox.
Fixes element.form being null across browsers when element is not a form field