Fix compilation with Mac SDK below 10.9 and clear some warnings.

Some fixes for Mac platform.
I have Mac OX and SDK with 10.8 version only, so I got an error with line 
QMAKE_MAC_SDK = macosx10.9
I change it, but I am not sure about it.
Could it be user-defined setting like DXSDK version in build-vars?