Fixes issue #12

See https://github.com/faye/websocket-driver-ruby/issues/12

Tested on OSX only.