tools build: Fix feature detect clean for out of source builds