Move global variables defs to a less race-prone area.