sh: Eliminate some gotos.
Fix dependency errors when linking libproc.

Reported by:	Oliver Hartmann
X-MFC-With:	r272488