Fix if statements in IR generation, and let the IR-based cross compiler actually cross compile.