Fix SSL errors not properly handled

Mono throws SSL errors as IOException when using SSLStream, instead of
AuthenticationException.