Fix for XML generation in IE

XML generation did not work correctly in IE when using Browserify-ed version of the code. It did not cope correctly with arrays.

This is a very minor change for an odd use case. But hopefully someone else will find it useful. Since it's IE specific, I'm not sure how to create a unit test for it.