FIX: more reliable heuristic for setting the `sub-system` flag correctly in generated red.exe.