Fix warnings about GetNumEvents undefined