Laser cooling of an indium atomic beam enabled by magnetic fields