Optimization of H− production in a magnetically filtered multicusp source