All of the privileges and immunities from liability, exemptions from laws, ordinances and rules, all pension, relief, disability, workmen’s compensation and other benefits which apply to the activity of officers, agents or employees of any such public agency when performing their respective functions within the territorial limits of their respective public agencies, shall apply to them to the same extent while engaged in the performance of any of their functions and duties extraterritorially under the provisions of the Joint Powers Agreements Act.