Don't compile cgo code with --coverage (#1808)

If we do an internal link, we may have undefined references to
coverage functions.

Fixes #1801
2 files changed