Return 0 for Windows, 1 for *nix and 2 for darwin.