autotools: fix a crazy race when building qt with multiple jobs