imap: fix parse-store-mail parsing because it breaks on gmail

Fix for a little crash that occured in the store-mail word. Seem to only happen on gmail.