fix FreeBSD problem and some mod for includedir