C89 fixes for charmonizer.main
Threads tests for Windows