Fixed backcompatibility with PHP 5.3 (using $this in lambda function).