Answering my own question, as I can't find this documented anywhere.
The problem here is that the OpenSSL build bundled with OS X doesn't come compiled with CMS supported. In order to enable CMS support you will have to compile your own version of OpenSSL.
First, clone the OpenSSL Github mirror:
git clone email@example.com:openssl/openssl.git
Checkout a stable version, for example 1.0.2:
git checkout OpenSSL_1_0_2
Configure the compiled to enable CMS support:
./Configure darwin64-x86_64-cc enable-cms
Then make and install openssl:
If everything goes well you should now have your selected version of OpenSSL installed at
/usr/local/ssl/bin/openssl. When running
/usr/local/ssl/bin/openssl cms you should see the following:
Usage cms [options] cert.pem ...
where options are
-encrypt encrypt message
-decrypt decrypt encrypted message
Note that this will not override your bundled openssl installation, so you will either need to modify your path or use the binary directly.