Cyclization of 9-substituted decanoic acid derivatives to 9-decanolide and 9-decanolactam