Fix building on Ubuntu Quantal and with Qt 4.6