Preparation of esters of nitrous acid