A gravitational-wave standard siren measurement of the Hubble constant