Update lib.js

Add a shim for the isArray method.
Since instaneof Array will not work on an Array created in another frame, we need to use Array.isArray method.
But since IE8 does not support the isArray method, we are creating this shim