A hybrid organic-inorganic perovskite with robust SHG switching