[js] 64 bit compilation fix - must go through an pointer sized integer before casting to a pointer