Fix support for gevent monkeypatching