Fixed error in Windows thread.c