Thiol-functionalized magnetic nanoparticles for static and dynamic removal of Pb(II) ions from waters