Imaging the crystal structure of few-layer two-dimensional crystals by optical nonlinearity