Fix XUnit output with Gecko

the toString() function is not called by gecko because a DOMNode
does not inherits from Object. We should call a specific function
to serialize the content of the XML.

Closes #753