fix event define error on windows platform