Adds fixes for supporting require('ws') as a client.
Merge pull request #167 from tessel/tcr-wsclient

Adds fixes for supporting require('ws') as a client.