Influence of thermal diffusion and shear thinning during the leveling of nanoimprinted patterns in a polystyrene thin film