Diffusion charging of nonspherical particles by bipolar ions under external magnetic fields