Fix: a minor bug in handling invar type;
Add: a minor workaround for compiling to javascript with emscripton (llvmsvn).