runtime: fix traceback in cgo programs
Fixes issue 6061.

R=golang-dev, bradfitz
CC=golang-dev
https://codereview.appspot.com/12609043