Fix a few glitches in getlogin_r.