Fix compiling errors with Clang 4.2.0 on Mac OS X