Estimating the spectral radius of a graph by the second Zagreb index