Compilation/porting fixes

The last update port seems to have broken some stuff.
Sorry for that one :).