go/build: fix test if built with CGO_ENABLED=0

Fixes issue 6567.

R=golang-dev, minux.ma
CC=golang-dev
https://codereview.appspot.com/14502060