fix unbroken while-loop

see http://andy.edinborough.org/C-Imap-and-Pop3-Library#comment-1308550974