Fix a few syntax errors such that the QC_CERTSTORE_PATH environment
variable is used correctly.

--- CMakeLists.txt.orig	2014-11-06 08:15:45 UTC
+++ CMakeLists.txt
@@ -262,13 +262,13 @@ message(STATUS "Checking for certstore..
 if( WIN32 )
 # USE BUILTIN
 else ( WIN32 )
-  if ( ENV{QC_CERTSTORE_PATH} )
-    if(EXISTS ENV{QC_CERTSTORE_PATH})
+  if ( DEFINED ENV{QC_CERTSTORE_PATH} )
+    if(EXISTS $ENV{QC_CERTSTORE_PATH})
       set( qca_CERTSTORE $ENV{QC_CERTSTORE_PATH})
-    else(EXISTS ENV{QC_CERTSTORE_PATH})
+    else(EXISTS $ENV{QC_CERTSTORE_PATH})
       # path to try
-    endif(EXISTS ENV{QC_CERTSTORE_PATH})
-  else( ENV{QC_CERTSTORE_PATH} )
+    endif(EXISTS $ENV{QC_CERTSTORE_PATH})
+  else( DEFINED ENV{QC_CERTSTORE_PATH} )
     set( toTry
       "/etc/ssl/certs/ca-certificates.crt"
       "/usr/share/ssl/cert.pem"
@@ -282,7 +282,7 @@ else ( WIN32 )
         set( qca_CERTSTORE ${_current_try})
       endif(EXISTS ${_current_try})
     endforeach (_current_try)
-  endif( ENV{QC_CERTSTORE_PATH} )
+  endif( DEFINED ENV{QC_CERTSTORE_PATH} )
 endif(WIN32)
 
 if (qca_CERTSTORE)
