Small portability cleanup.
Change delay to tdelay.