Snap: gracefully fail if getent can't find home directory

Merged Ted Gould requested to merge ted.gould/inkscape:snap-cherry-pick-getenv into 1.1.x

This reverts to the pre-1.2 behaviour if getent can't find the user's home directory. This can happen if the system nsswitch.conf has been modified (to use LDAP, SSSD, or others) and NSCD is not running to the system to act as a proxy to the snaps.

Cherry-pick from main