Sync Host:GetEnvironment with Linux and Kamil Rytarowski's forthcoming NetBSD change in review D31784. llvm-svn: 299781