std::string conversion without C++11