Fix monkey_patch() on Python 3

The importlib module must use real thread locks, not eventlet.Semaphore.