Use std::to_string for non-mingw/cygwin
Use std::to_string for non-mingw/cygwin

`std::to_string` is faster than `std::stringstream`.

This issue only presents in older versions of Mingw/Cygwin. My Mingw64 GCC 7.1.0 has `std::to_string`. I can't determine the exact version of GCC that fixed the issue.

Closes #4493.

PiperOrigin-RevId: 187145391

akira-baruah/bazel,dropbox/bazel,meteorcloudy/bazel,perezd/bazel,katre/bazel,dslomov/bazel,meteorcloudy/bazel,ButterflyNetwork/bazel,cushon/bazel,bazelbuild/bazel,werkt/bazel,ulfjack/bazel,dslomov/bazel-windows,davidzchen/bazel,aehlig/bazel,akira-baruah/bazel,safarmer/bazel,werkt/bazel,ulfjack/bazel,bazelbuild/bazel,cushon/bazel,akira-baruah/bazel,akira-baruah/bazel,dslomov/bazel-windows,davidzchen/bazel,safarmer/bazel,davidzchen/bazel,katre/bazel,twitter-forks/bazel,ButterflyNetwork/bazel,aehlig/bazel,perezd/bazel,dslomov/bazel,davidzchen/bazel,meteorcloudy/bazel,safarmer/bazel,katre/bazel,dslomov/bazel,twitter-forks/bazel,cushon/bazel,dslomov/bazel-windows,aehlig/bazel,dslomov/bazel-windows,dropbox/bazel,meteorcloudy/bazel,cushon/bazel,katre/bazel,cushon/bazel,dslomov/bazel-windows,bazelbuild/bazel,twitter-forks/bazel,safarmer/bazel,twitter-forks/bazel,twitter-forks/bazel,werkt/bazel,ButterflyNetwork/bazel,perezd/bazel,ulfjack/bazel,meteorcloudy/bazel,davidzchen/bazel,dropbox/bazel,safarmer/bazel,aehlig/bazel,katre/bazel,dropbox/bazel,werkt/bazel,dslomov/bazel,aehlig/bazel,perezd/bazel,katre/bazel,ButterflyNetwork/bazel,perezd/bazel,dslomov/bazel,twitter-forks/bazel,ulfjack/bazel,dropbox/bazel,werkt/bazel,ulfjack/bazel,perezd/bazel,ulfjack/bazel,ButterflyNetwork/bazel,meteorcloudy/bazel,davidzchen/bazel,aehlig/bazel,perezd/bazel,dslomov/bazel-windows,werkt/bazel,davidzchen/bazel,ulfjack/bazel,dropbox/bazel,bazelbuild/bazel,bazelbuild/bazel,dslomov/bazel,akira-baruah/bazel,dslomov/bazel,ButterflyNetwork/bazel,aehlig/bazel,meteorcloudy/bazel,safarmer/bazel,akira-baruah/bazel,cushon/bazel,bazelbuild/bazel,twitter-forks/bazel