fix autolink of events on gcc. fix compile on clang.

Surprisingly clang defines __GNUC__.
This will also make clang builds behave better when running local games (WantsEvent returns true when autolink is enabled).