Curing of N,N′-diglycidylimides with polyfunctional compounds