(2)If any suit under this Act is adjusted wholly or in part by any lawful agreement or compromise, or if the defendant satisfies the plaintiff in respect to the whole or any part of the matter of the suit, the Court shall pass a decree in accordance with such agreement, compromise or satisfaction, so far as it relates to the suit :Provided that no decree shall be passed in accordance with any agreement or compromise the terms of which, if they were embodied in a contract, could not be enforced under this Act.