Fix for ROOT-6586 (ninja cannot properly clean)