When I used the PHP Version Switcher V2, I switched to v 7.1.9. I also checked off mongodb as an option.
Once finished, from my ssh terminal, I checked the installation.
I got:
PHP Warning: PHP Startup: mongodb: Unable to initialize module
Module compiled with module API=20151012
PHP compiled with module API=20160303
These options need to match