sh: don't overwrite login environment variables if already set

Certain environment variables (HOME, LOGNAME, USER, SHELL) are set
during early shell startup to emulate what login/su would do on
UNIX.  If any of these are already set don't overwrite them.