Fix build warnings on mac and linux.