for TLSv1 + follow php/curl best practice
support TLS when the constant is not defined
Merge branch 'hotfix-0.9.5'