go.net/ipv4: fix build on dragonfly, plan9, solaris

LGTM=aram, r
R=golang-codereviews, 0intro, gobot, dave, aram, r
CC=golang-codereviews
https://golang.org/cl/49430047
6 files changed