Get rid of unused constants and fix isunix to include BSD