Synthesis of organic compounds in the circumstellar environment