doc/progs: don't try building cgo tests if CGO_ENABLED=0

R=golang-dev, jsing, r
CC=golang-dev
https://codereview.appspot.com/14523056