Fix some includes and warnings (which default to errors with current compiler settings) concerning unsigned int / int comparison