Win32: fix registry entry handling.