Replacing strstream may be possible, but requires more work and a better understanding of the code.
This may contain prexisting 64-bit issues, caused by hammering pointers into ints.