Fix buildworld on Linux/macOS after nvi update
This re-applies r365941 which was lost in the nvi update.