fix pcbsd libsh merge. Left out critical functions.