nsswitch: Fix short writes in winbind_write_sock