Build fix for Qt and Cairo builds