Fix install target and add cpack support.

This supports internal packaging efforts and also make distributions behave more like a real library.