Add cgo support (fixes #4)