Adding specialization for 4 parameters.

Had to increase the AutoDiffTerm template to five argument in order to make 4 parameters a specialization.