Updated _wrap_EventCallback to work in the case threads are not initialized in Python.