ecmascript: Fix broken malloc