Fix incorrect stringstream syntax.

The str() function is not being used to pull data out of stringstream mgs.  This causes the build to fail when trying to apply mgs to the << operand.