Fix linking errors when building dataloader test binaries on Windows (#17494)
Summary:
Fixes #17489.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/17494
Differential Revision: D14226525
Pulled By: ezyang
fbshipit-source-id: 3dfef9bc6f443d647e9f05a54bc17c5717033723