support multithread patch on Windows