cmd/api: make it work even when cgo is disabled
make use of $USER or %USERNAME% to determine the current user.
Fixes issue 6578.

R=golang-dev, bradfitz, alex.brainman
CC=golang-dev
https://codereview.appspot.com/14649043