Make listenOnce return its unlisten function.