Fixing a deprecated use of preg_replace

PHP Deprecated:  preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /devhomes/jgrosman/codebase/phpsdk/lib/restagent/restagent.lib.php on line 161

http://stackoverflow.com/questions/15454220/replace-preg-replace-e-modifier-with-preg-replace-callback