Adapt to new SimpleXML from PHP5.4