Rebased against awk from OpenBSD 5.6.