Fixed issues with unknown compiler flags when compiling with gcc.