Field-induced superconductor-insulator transition and grain size in thin granular films of indium