Simple, you use a Television when you run an n64, TV's don't work the same as monitors. The n64 achieves perfect sync because it has lots of clever hardware built in
Seriously, the PC is not designed to run N64 games thats what emulators are for, to translate n64 into code that our pc's can actually understand, emulators are
not perfect.
Emulators throttle the video and sound to a specific speed such as 30 frames per second for instance. when you enable vsync all its doing is adding a directX/opengl throttle to the video. Hence the emulators "speed limit" function.
Edit to add more detail:
This method is hardly perfect either, load up Wetrix (U) with the default settings in Project64 1.6, the game will run far too fast, thats not perfect sync is it?