Use generic deleter lambda instead of a hard coded UnregisterClass.