Some additional fixes for class loading and support for PHP 5.3 [ci skip]