imap: Simplified memcmp() in tagged response parsing