[js] compilation fix for 64 bit platforms