make code compile on windows

switched unix-specific (also jmv specific) uid/gid detection to reflection.