fixed OS X bug with issues with the compiler, detects if compiling on apple otherwise uses previous system