Declare $wgMessagesDirs outside of $wgExtensionFunctions

Needed for Wikimedia localization update (that doesn't execute
$wgExtensionFunctions)

See also: https://github.com/wmde/WikimediaBadges/pull/13