PHP 5.4 Compatibility: rewrite preg_replace e-modifier