A flag needs to be checked before calling dprintf

All the other calls to dprintf in _set_priv() are wrapped with
if(dologging) {}.  Wrap it for the one that is not. Also fix the
messages to specify that this message is in _set_priv(), not
set_user_priv().

This part of the code is only used on Windows, so I have not tested it.

Noticed while investigating #3357