Load environment scripts in JSIL.js earlier so that stdout/stderr are available while loading libraries like Bootstrap and Core.Types.
Allow casting arrays to IList. Fixes issue #159.