fix various 'comparison of integers of different signs' compiling errors...

Fix various compiling errors under Mac OS X 10.9.4