Added temporary vector to adjacent_difference().

Fixes issue #278.