Bulk viscosity of magnetized neutron star matter