Replace hex and other string modifiers to use boost::format when possible.