Few changes to make it compile with CGO (http://golang.org/cmd/cgo/).