Fix indexing on Magento EE

Fix indexing for EE with PHP versions either than 5.3.
Remove passing index array array by reference in iterator_apply
function.
Merge branch 'hotfix/ee-indexing' into develop