Magnetic carboxyl functional nanoporous polymer: synthesis, characterization and its application for methylene blue adsorption