fix pref path on windows, use getprefpath for both release and debug mode