Fix to handle undefined order of statics initialization in C++.