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