compatibility fix: PHP 5.3 removed  from anonymous functions