fix possible leak in msg recv; fix Makefile.am