Modifications to make it compatible /w gevent_websocket > 0.3.6