syscall: append to environment in tests, don't clobber it

This is a partial backport of https://golang.org/cl/233318.
It's only a partial backport because part of the change was
already applied to libgo in CL 193497 as part of the update
to the Go 1.13beta1 release.

Fixes https://gcc.gnu.org/PR95061

Change-Id: I3d37039b8df57e361b70d760aba22e71ef1cc657
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/233359
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
1 file changed