Fixes to Qt 5.2

I have tested this against the newest headers from Mer devel repositories. Will add testing notes once the package builds.