Add extra argument.

All internal methods for retrieving the needed information use the
passed variable. It should be available for external methods as well.
Merge pull request #1616 from petervanderdoes/feature/add_argument_to_user_defined_replacement_variables_function_call

Add extra argument for external methods. props @petervanderdoes