Magnetism in dodecanethiol-capped gold nanoparticles: Role of size and capping agent