Fix Windows build (#26246)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/26246
Broken due to https://github.com/pytorch/pytorch/issues/12117. Try fixing it.
ghstack-source-id: 90137033
Test Plan: waitforsandcastle
Reviewed By: zou3519
Differential Revision: D17387317
fbshipit-source-id: 705998c0b1608668d510b47f4fe20cecf5057c5f