core-simpl: track foreign functions in boxing transform