Workaround for MSVC not handling threadsafe static local initialisation.