python3: fix Unicode-objects must be encoded before hashing