An upwind differencing scheme for the equations of ideal magnetohydrodynamics