fix bsd compile issue (bug #5731)