Older C++ compilers do not provide a standard std::stringstream.
Use our compatibility interfaces instead.
Also avoid std::stringstream(openmode) signature. Our approximate
stringstream implementation provided when the standard one is not
available does not support the openmode argument.
Implement cmGlobalGenerator::ComputeTargetObjects in the Ninja generator
to pre-compute all the object file names. Use the results during
generation instead of re-computing it later.
Generally these are only required in build statements, as Ninja wants
to be able to chop paths up. But it doesn't hurt to also try to use
them in command line arguments.