Add compatibility for Magento 1.7