Fixed compatibility issue with Mozilla Rhino in XmlWriter