tool: use XFERFUNCTION to save some casts
build: distribute and install libcurl.m4 by default