Revised EventEmitter inheritance so it uses the extend method itself. The previous way prevented polymorophic inheritance.