Fixes cast to int
Add support for javascript externs