Added bindForeignAsObject method