SSH2: improve handling of incomplete packets

Fixes #270