fixes #3601: Use secure websockets if available

Websockets_ssl* settings must be configured with the appropriate
certificates for this to work.