Use preg_replace_callback as the \e option is deprecated in PHP 5.5

This should fix the issue in https://github.com/inadarei/restagent/issues/7