Add object support to js engine