Makes it build correctly on Mac OS X

Hi, I had to add a few lines to the CMakeLists.txt file to make it behave properly on Mac OS X. Qt is installed in a user-specified location (in my case it's ~/src/Qt) so it was hard for CMake to find it. I've modified it so that if you set $QTDIR appropriately (in my case it's ~/src/Qt/5.1.0/clang_64) it can actually find everything it needs.