Fix build with Qt 5.1 development branch

QT_{BEGIN,END}_HEADER defines were removed.
Merge pull request #736 from plfiorini/master

Fix build with Qt 5.1 development branch