Section 17. A water fence, or fence running into the water, shall, unless otherwise agreed by the parties, be built by them in equal shares; and they shall have like remedies as in case of partition fences.