Bug fix #244: Build failure with -DDEBUG_EVENTS

Fix build failure with -DDEBUG_EVENTS, caused by incorrect references to
X Sync macros. Thanks to blueyed for reporting. (#244)