PHP 5.1 compatibility fix: DOMNodeList is not Traversable in 5.1