Fix random crashes caused by accidental 32bit pointer casts in EventMonitor (thx risu), closes #22