Fix threading issue

Ribasushi sent me this failing test, added to repo and made the 1-line
fix.
Fixes for some windows stuff.

ExitMagic was causing some strange issues on windows, some tests failed
outright, one had an attempt to free an unreferenced scalar. Been
investigating and poking on a windows VM and windows laptop for a couple
days
Version bump for the other changes to go out