Gravitational waves from the minimal gauged U(1)B−L model