cmake : fix linux or freebsd check