idmap: Move idmap_init() under the static vars