Merge pull request #5314 from pks-t/pks/dll-main-removal global: convert to fiber-local storage to fix exit races