fix linker command failed on Mac