Move the libraries bindist generation code into libraries/Makefile