Fix the Mac build.

A file moved upstream and various fatal clang warnings.
Merge pull request #820 from darktears/mac-fixes

Fix the Mac build.