Bangladesh defeat Pakistan by four wickets in third one-dayer