Thanks to Thomas Uhle for this patch, see http://sourceforge.net/p/ngspice/patches/26/ #26 GetThreadId() missing in older Win32 API, proposing to use GetCurrentThreadId() instead