Mimic nodejs style event emitting