Make sure that the locale is initialized correctly if specified.

If nothing else this will make a difference for any rivers accessing
 the file system or such.