os: fix windows and plan9 builds

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/12519046