Chemical modification of crosslinked resins by phase transfer catalysis: preparation of polymer-bound dinitriles and diamines