New save/restore api; support for require.nodeRequire (used mostly by AMD plugins)