Move return class after class definition. Fixes PHP 5.5 fatal errors.
Merge pull request #3594 from markoheijnen/Fix-php5.5

Move return class after class definition. Fixes PHP 5.5 fatal errors.