The compensation of such policemen shall be paid by the companies for which the policemen were respectively appointed as may be agreed upon between them.