Fixes #6134, perform name change from Factory to BaseFactory for PHP 5.3.2.