Fix cmake build (for case sensitive fs)
Fix linking errors for cmake build on Linux

Missing mainly libX11 and friends