Fix build for GNU/Linux
Rewrite condition system (Plus fixes build for Rust branch master)