Fix compilation with clang.
Fix compilation with Qt 5 on OS X.