Hardeners for varnishes