Weil reciprocity for algebraic curves