Optical second-harmonic generation from two-dimensional hexagonal crystals with broken space inversion symmetry