Fix platformFromTriple to handle hyphens in the OS, + tidying re: https://github.com/ghc-ios/cabal/commit/43b42dc64515cc221ee2175f43ff8ecb8c663da1#commitcomment-2670743