What worked for me was to use the OpenSSL headers from Brew:
- Install brew
- Install openssl using brew:
brew install openssl
- Use the openssl header file when installing the pecl module:
C_INCLUDE_PATH=/usr/local/opt/openssl/include bin/pecl install mongodb