Fix compile on non X11 platforms