fixed detection of older shell when making a connection

correctly detect which of the following should be passed to connect
method:
  verify_certificate - older versions
  verify_server_cert - newer versions