Update Router.php

After upgrading PHP 5.3 to 5.4 this change was the only way to avoid memory leaks caused by preg_replace_callback() creating anonymous functions.