Add handling of protocols in initAsClient function

Value of the variable "protocols" is not copied to the "'Sec-WebSocket-Protocol" property in websocket upgrade header. 

So far it is possible to override this functionality calling 
new WebSocket("ws://URL" , {protocol:"USER DEFINED PROTOCOL"});

Please pull this simple repair.

Thank you in advance