Support for cgo flags

Fixes #48.