Preparation of acid anhydrides