fix JSObject proxy printing for foreign objects

Fixes debugger not appearing when error involves
foreign object.