Fixed some compilation issues with the Qt port.