adding an install target and option for dynamic libraries