changed compare function to have "unsigned int"

in order to make this compile with clang on FreeBSD 10.