Synthesis and ion-exchange properties of crystalline titanium and zirconium phosphates