Replaced stringstream by boost::lexical_cast. Refs #9254.