Fix some compile warnings and errors in the !USE_PAM case.