Chemoselective synthesis of 3-and 5-pyrazolylacetates