Patch from J Sisson. Fix compile on *BSD.