Add a portable thread-safe version of strerror.