Added FreeBSD check and PREFIX
Added FreeBSD check and PREFIX