replace deprecated function

in PHP 5.5: "The /e modifier is deprecated, use preg_replace_callback"


This patch works only for php 5.3 <= because of the use of an anonymous function.
But would work for 5.2 too, if we created a named function