Make IMAP flags parsing much faster by using `read'.