Portability fixes

This changes makes possible to built it on Linux with Qt4.