Fix 'cannot mix incompatible qt libraries' bug