fix warnings with clang

This just addresses a couple of warnings (that become errors with strict compile flags) with clang 3.1 about type mismatches in comparisons.

Great to see this moved to github!