Fix getpass on Windows (Fixes #2547)