Workaround VC++Runtime deadlock bug by accessing thread HANDLE directly and calling TerminateThread().