go.tools/go/loader: fix Solaris build
go.tools/go/loader: fix Solaris build

Also fix one test that failed on Plan 9.

LGTM=0intro, dave
R=golang-codereviews, 0intro, dave
CC=golang-codereviews
https://golang.org/cl/101370053

dmitris/tools,cmars/tools,cw2018/tools,runcom/tools,josharian/tools,golang/tools,matryer/tools,cmars/tools,josharian/tools,argandas/tools,syreclabs/go-tools,argandas/tools,springning/tools,golang/tools,springning/tools,cmars/tools,syreclabs/go-tools,nicot/tools,syreclabs/go-tools,matryer/tools,nicot/tools,4ad/tools,josharian/tools,magiccao/tools,nicot/tools,maddyonline/tools,maddyonline/tools,argandas/tools,cw2018/tools,jdhenke/tools,sshetty10/tools,runcom/tools,matryer/tools,golang/tools,cw2018/tools,springning/tools,dmitris/tools,sshetty10/tools,springning/tools,jdhenke/tools,magiccao/tools,magiccao/tools,jdhenke/tools,runcom/tools,4ad/tools,nicot/tools,glasser/golang-tools,syreclabs/go-tools,josharian/tools,dmitris/tools,glasser/golang-tools,jdhenke/tools,sshetty10/tools,matryer/tools,syreclabs/go-tools,argandas/tools,magiccao/tools,golang/tools,sshetty10/tools,glasser/golang-tools,maddyonline/tools,golang/tools,runcom/tools,cmars/tools,syreclabs/go-tools,maddyonline/tools,dmitris/tools,4ad/tools,glasser/golang-tools,cw2018/tools