Accept tls options in constructor arguments.

Needed to set rejectUnauthorized for self signed certificates.