fixed 'MAXINT undefined' error for osx
fixed 'CHAR_MAX undefined' error for osx
librt is for clock_gettime and therefore not required for osx