kCFStreamPropertySSLPeerTrust fail on OS X<=10.8

on OS X <= 10.8 (maybe 10.9 too), the kCFStreamPropertySSLPeerTrust
method works the first time, but always returns NULL after, causing an
infinite loop. This change falls back to the old
kCFStreamPropertySSLPeerCertificates method if the first one returns
NULL.