Fixed some things for compiling on Linux and with Qt4.