[c10d] Fix compilation of NCCL_EXP path (#119805)
Fixes issue pointed out in https://github.com/pytorch/pytorch/pull/119421#issuecomment-1941694621
When refactoring ProcessGroupNCCL, some code in the NCCL_EXP path wasn't done cleanly.
Cc: @kunalb @H-Huang
Pull Request resolved: https://github.com/pytorch/pytorch/pull/119805
Approved by: https://github.com/H-Huang