Correctly handle errors from :func:`getpass.getuser` in Python 3.13.