imap.c: Fixed an incorrect variable reference

Fixed an incorrect variable reference which was introduced in commit
a1701eea289f as a result of a copy and paste from SMTP/POP3.