libc: Implement properly pthread_equal() stub.