Structural phase transition and anti-quadrupolar ordering in PrFe4P12 and PrRu4P12