Build refactor to enable 'make distcheck' to pass.