fix(jqLite): make class API work consistently for IE9

IE9 has issues with setAttribute() and getAttribute() when an element uses XML
namespaces.

This should make the behaviour on IE9 consistent with a minimal perf hit, and
make it easy to remove support when IE9 is no longer supported.

Fixes #5001