Fix Linux CMake issues arising from Windows workaround