Synthesis of indole-2-carboxylic esters