Add IMAP support to PHP.

Related to travis-ci/travis-ci#1257.