Migrate daemon build to autotools