fix windows build issue in Thread