Use an extension function for initializing

$wgMessagesDirs not declared global