sdl2-compat: Add CMake option to build without X11 on modern Linux

[Couldn't obtain the patch due to network issues; please check the above link instead.]