Fix object context error in PHP 5.3