The compensation of railroad or street railway policemen shall be paid by their corporate authority. The Commonwealth of Pennsylvania shall not be held liable for any wrongful act of any police officer commissioned under the provisions of this chapter.