Correctly inherit from EventEmitter

fixes #10