Spontaneous compactification and Ricci‐flat manifolds with torsion