Fixed broken set_event and reset_event in case of non linux systems.