Fix some compiler errors on OS X 10.9 with Qt5.2.0-rc1

fix one compiler error
cast QAtomicInt to (unsigned int)

and fix some compiler errors (missing includes) 
error: member access into incomplete type 'const QMimeData'