Rebased against awk from OpenBSD 5.5.