Fix compilation from source archives when using already-installed packages.