fix compile failure on Ubuntu 14.04 (amd64).
Added to check for need to link libX11 explicity for XFlush().