fixes #9: pass dependencies in to foreign functions to enable DCE

Fixes #9.