fix code style.
fixed the configure error and compile warning in FreeBSD.

Thanks to yaoweibin.
Merge pull request #12 from monadbobo/fix_upstream

Fix upstream