cgo: more non-bsd fixes

To prevent gcc from trying to build indirect.c, build rules
have been added.

Updated #19.