Added a block to check for gcc before setting specific compiler flags.