Make it work with GCC 4.4.

Use boost::lexical_cast instead of std::to_string, which doesn't work on this compiler.