Add a chain mask set function, introduced in an earlier FreeBSD commit.