Fix WikibaseLib.php in case not loaded in the default environment

If WikibaseLib.php is invoked without the auto loader being avialable
the following error will occur (this eg. happens when using the
install maintenance script):
PHP Fatal error:  Class 'Wikibase\TemplateRegistry' not found in /srv/extensions/Wikibase/lib/WikibaseLib.php on line 242

(Untested)

Change-Id: I88bfd5e9ac766e8248af94586d9f5bf73d41b614