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

Fix compiling errors found in Mac OS X 10.9.4