Use put_char() when needed

The current version fails to compile with rust-0.12.0