fix compiling bug under mac