Fix undefined EventEmitter (fixes #3)

Define EventEmitter before assigning it.