Improve installation of build dependencies