imap: fix compiler warning

error: declaration of 'imap' shadows a previous local