Fix OpenSSL detection on distributions which modify the version number.

This should now ignore everything after the version number. I have tested this on OS X and Ubuntu Server and it works fine on these systems.