While testing 17270 I noticed that master (bdda137878904e9401a84e308ac74c93c2ef87c1) does not run on NetBSD. I assume this started after #17085 changed the fallback locale from `C` to `C.UTF-8`. There doesn't seem to be a `C.UTF-8` locale on NetBSD.

```bash
src/bitcoind
terminate called after throwing an instance of 'std::runtime_error'
  what():  locale::facet::_S_create_c_locale name not valid
Abort trap (core dumped)
```

`LC_ALL=C src/bitcoind` works, `LC_ALL=en_US.UTF-8 src/bitcoind` does not.

```bash
locale
LANG=""
LC_CTYPE="en_US.UTF-8"
LC_COLLATE="C"
LC_TIME="C"
LC_NUMERIC="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_ALL=""
```
bp::child c(
        str_command,
        bp::std_out > stdout_stream,
        bp::std_err > stderr_stream,
        bp::std_in < stdin_stream
    );
    if (!str_std_in.empty()) {
        stdin_stream << str_std_in << std::endl;
    }
    stdin_stream.pipe().close();
    std::string result;
    std::string error;
    std::getline(stdout_stream, result);
    std::getline(stderr_stream, error);
    c.wait();
    const int n_error = c.exit_code();
    if (n_error) throw std::runtime_error(strprintf("RunCommandParseJSON error: process(%s) returned %d: %s\n", str_command, n_error, error));
    if (!result_json.read(result)) throw std::runtime_error("Unable to parse JSON: " + result);
    return result_json;
#else
    throw std::runtime_error("Compiled without external signing support (required for external signing).");
#endif 
}
void SetupEnvironment()
{
#ifdef HAVE_MALLOPT_ARENA_MAX