Fixed build on non-X11 platform