Ionospheric and Birkeland current distributions inferred from the MAGSAT magnetometer data