Role of striction at magnetic and structural transitions in iron pnictides