Remove an old style cast.
Mark system headers as system headers in CMake.

Compilers suppress some errors in system headers, this avoids false
positives of some compiler warnings not in our source code.