Fix Mac compiling issue