Fix for PHP 5.3

$this in closures does not work in PHP 5.3 so we have to pass the object
explicitely, AND all the needed private properties too.