Higher derivative couplings in string theory and the B field