BCS-BEC crossover in a two-dimensional Fermi gas