Don't use ‘undefined’ for IORef initialisation.

While technically we update it right after anyway, this makes me feel
safer in case any code ever moves around.