Autodetect openssl cms support for libressl compatibility.

Since cms support is now determined by autoconf, it will work as expected if openssl ever drops cms support or libressl ever adds it.

I have removed a previously proposed autoconf.h include at the request of Ben Kaduk.