Dynamic Consensus on the Median Value in Open Multi-Agent Systems