Merge pull request #2504 from dsandbrink/bugfix/thrift_5418

THRIFT-5418: C++ to_string and ostream operator not always generated