A nonequilibrium simulation method for calculating tracer diffusion coefficients of small solutes in n-alkane liquids and polymers