tls: workaround http.js oddities