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.