Fix compiling error with some compilers on Mac