fix bsd build