Surface-enhanced raman scattering detection of pH with silica-encapsulated 4-mercaptobenzoic acid-functionalized silver nanoparticles