Have threadsafe locale switching