PHP 5.4+ issue

SimpleXML objects seem to be handled differently in 5.4+
Merge pull request #44 from mitchmac/1.x

PHP 5.4+ issue