On the value function of one-dimensional optimal control problems with junctions