fix bugs for mac gcc 4.2 compiler.
use mac gcc 4.2 to compile gaia program.