SimpleXMLElement serialization fix