In any derivative suit instituted by a stockholder of a corporation, it shall be averred in the complaint that the plaintiff was a stockholder of the corporation at the time of the transaction of which such stockholder complains or that such stockholder's stock thereafter devolved upon such stockholder by operation of law.