Replace ~str with StrBuf

Fixes build with rust master.