Fix build. Replace some instances of ~str with StrBuf