adding fix for when websocket is undefined

for: https://github.com/LearnBoost/engine.io/issues/159