fix regedit to compile with MSVC