This uses the same utility function that mosh-client/mosh-server do.
This resolves portability issues with the 'locale' command.
This fixes OpenBSD 6.0 and probably Haiku builds.
This tests cryptographic primitives implemented by others. It uses the same
interfaces and indeed the same compiled object code as the Mosh client and
server. It does not particularly test any code written for the Mosh project.