Measurements of second-order susceptibility in crystalline and porous silicon