Fix building issue for Mac OS