Fix parallel build and installation of library