core simpl: fixing handling of boxing for foreign imported functions