Fixed build issues for Clang 6.0 on OS X