fixed cmake for FreeBSD