Stable carbamate pathway towards organic–inorganic hybrid perovskites and aromatic imines