util: add #ifdefs for windows

Suggested by Joseph Atzinger <joe.atzinger.dev@gmail.com>.

Change-Id: I32de34ba9281c24ece813906db6a80a7b0b737a3
Reviewed-on: https://code-review.googlesource.com/1340
Reviewed-by: Russ Cox <rsc@google.com>
Reviewed-by: Russ Cox <rsc@swtch.com>