Adding changes for Magento >= 1.8 based on
http://www.magentocommerce.com/index.php/getmagento/ce_patches/PATCH_SUPEE-2747_EE_1.13.1.0_v1.sh