Fix dependency problem for "make dist".

Fixes #4200