minor fix for shared build (#80739)
Summary: Fixed some issues for the shared buck build
Test Plan: CI
Reviewed By: JacobSzwejbka, larryliu0820
Differential Revision: D37564552
Pull Request resolved: https://github.com/pytorch/pytorch/pull/80739
Approved by: https://github.com/osalpekar, https://github.com/malfet