fixed the configure error and compile warning in FreeBSD

fixed the configure error and compile warning in FreeBSD