Fix "Fatal error: Using $this when not in object context" on PHP 5.3