Allow custom TLS options (fix #181)