Fixed build on non-x11 platform