Near edge X-ray absorption fine structure spectroscopy of chemically modified porous silicon