php-5.5 compatibility

`preg_replace_callback` instead of `preg_replace` for php-5.5 and symfony 1.5 compatibility
Merge pull request #3 from IllyaSvergun/patch-1

PHP 5.5 compatibility