The expenses of the referees, including those of a surveyor and his or her assistants, when employed, shall be ascertained and allowed by the court, and the amount thereof, together with the fees allowed by law to the referees, shall be paid by the plaintiff and may be allowed as costs.