Avoid race conditions when initializing static members.