Fix build system for dist.