Use homebrew's openssl for IMAP

Right now we only use homebrew's openssl for the main configuration option, but not sub-options like imap.

Fixes #1215.