Optical non-linearity and hysteresis in porous silicon