simplify Lwt code
remove bash-ism in build script
simplify build_sockaddr