Allow populate sites table to work without wikibase enabled

@note: this really needs to be moved to core or somewhere
outside of Wikibase!

Change-Id: Ie3116f5d0784c8b49674eb14c98c34c3135404af