Some small changes to get stuff compiling correctly with gcc