Gauge freedom in the N-body problem of celestial mechanics