Testsuite: more portable implementation of "showenv"

At least one Solaris installation seems not to have "whoami"