Improve stub lib installation to support proper uninstall