A pulsar-based timescale from the International Pulsar Timing Array