agent: Fix binary vs. text mode problem in ssh.