Only check the certificate's host name if InsecureSkipVerify is not set.
go xmpp library (original was written by russ cox )