Fixed class exists error in earlier versions of magento