fix some compile issues:
* add SUN_LEN macro
* add MSG_NOSIGNAL macro
* fix configure.ac to link socket and network lib
* fix build steps in bepfile.