PHP 5.4 Compatibility - removed e-modifier from preg_replace

e-modifier for preg_replace is deprecated
preg_replace calls rewritten to preg_replace_callback