Replace string matching with a switch on Triple::getEnvironment.