Homogenization of MHD flows in porous media