The time constant of first-passage percolation on the square lattice