Fix unused function warning on Linux
Fix unused function warning on Linux

This function is only used on macOS so it produced this warning on
Linux:

```
external/build_bazel_rules_swift/tools/worker/work_processor.cc:37:13: error: unused function 'GetMandatoryEnvVar' [-Werror,-Wunused-function]
std::string GetMandatoryEnvVar(const std::string &var_name) {
            ^
1 error generated.
```

bazelbuild/rules_swift,bazelbuild/rules_swift