Shift away from using std::str::from_utf8.

(It's probably being removed, see mozilla/rust#10701.)