Add modications, stripping functionality liberally, to allow library to compile on OSX, using functions from <pwd.h>