Correct UserIntermediateCallback (shared_ptr instead of optional).
Merge pull request #7 from bchretien/master

Correct UserIntermediateCallback