Try to pacify dash-using linux distros with a very old-school shell variable compare.

While there fix the cmake shared build.