Fix graph and pkg/graphdb on FreeBSD