Use c10::to_string that works cross platform (#15117)
Summary:
Fix master breakage introduced in #15108
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15117
Differential Revision: D13430568
Pulled By: bddppq
fbshipit-source-id: ce10bc552f085d1bf0afbc13119991bee014ac95