More selective autolinking of erlang functions.

Only linking modules in the erlang distribution lib_dir and
only if the function is exported with the same arity.