Don't pass std::string by value.

In some implementations move of an std::string may be relatively expensive due to the small buffer optimization, so it's better to pass them by reference.