Changing hsgthread back to C

We change hsgthread to C++ because the mingw32 windows headers seemed to
work better that way.  But it turns out this causes problems for some
(probably a result of dependency it introduces on standard C++ libs)
(reverted from commit c12c9018b38d629d33347d9654cef5957f65ca86)