Magnetostatic analog for the calculation of phase contours in electron holography of magnetic films