fallback for browsers that don't support domElement.outerHTML

At least Firefox browsers < version 11 do not support the outerHTML
property for DOM elements. The fallback is to use
XMLSerializer.serializeToString when outerHTML is not available.
Merge pull request #2333 from fivetanley/firefox-10-weird-bug

fallback for browsers that don't support domElement.outerHTML