cmake: use crypt32.lib when building with OpenSSL on windows

Reviewed-by: Peter Wu
Closes #1149
Fixes #1147
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a6a7368..31a0d41 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -590,6 +590,8 @@
         set(CURL_LIBS ${CURL_LIBS} "crypt32")
       endif()
     endif()
+  elseif(USE_OPENSSL)
+    set(CURL_LIBS ${CURL_LIBS} "crypt32")
   endif()
 endif(NOT UNIX)