Fix some gc-related issues in asmjs generated code.