Added the option of using approximate Wolfe conditions for the linesearch.