changed compare function to have "unsigned int"

in order to make this compile with clang on FreeBSD 10.
Merge pull request #143 from arjanvandervelde/patch-1

changed compare function to have "unsigned int"