More windows fixes towards the code refactor (#16451)
Summary:
Fixes #16446.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/16451
Differential Revision: D13864388
Pulled By: soumith
fbshipit-source-id: 6cb173eafbd3da33c479c56c85aff75e8be4bf35