Work around PHP 5.3 limitation

$this in anonymous functions is only supported in PHP >= 5.4

Signed-off-by: Florian Pritz <bluewind@xinu.at>