Moved flags to X11 only, fixed #ifdef