Fix compiler warnings on some BSD variants.