add toJs() function to allow custom object to convert to js proxified value