Fix compilation error on BSD systems