Fixed bug #3489: The code assumed that two global variables would be constructed in a particular order, but global variable initialization order is compiler-dependent.
Merge pull request #2171 from djetter99:fix_static_init_order