Fix build under kfreebsd.

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>