Various fixes to make KDE4 working.