Fix a segmentation fault in python binding of EventListener