CMake: add OpenSSL version check

On OSX the version check helps to identify if the system OpenSSL
(which is old) is found instead of Homebrew's OpenSSL.
Before, the compilation failed while now we fail while executing
CMake with a much more readable error message.