Backport to Qt 5.0 for Ubuntu support

#11