cmake: updated OpenSSL build

Cmake build generation:
- updated openssl detection to make it common for Linux/Win 
- fixed issue with "openssl/crypto.h - not found" even if openssl is detected

Tested on windows with ninja(VC10 x64)/VC10 x32 and Linux Fedora 17 x64 with gcc 4.7.2