Replaced std::stringstream instances by std::ostringstream ones.