autogen: Support being called from external build dir