Fixed use of $this when not in object context in PHP 5.3.