build: Fix compile warning with clang 3.3

src/descrambler/cwc.c:493:11: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare]
  if (len < 0) return -1;
      ~~~ ^ ~
build: Fix compiler warning and properly cast return value of pthread_self() to long