Cosmic acceleration in Brans–Dicke cosmology