Fix preg_replace for PHP 5.5