Changes to support state creation used by luajit.