Fix 'invalid thread id' issue #13 by making sure tid is a C long int.
Merge pull request #28 from jeffito/master

Fix 'invalid thread id' issue #13 by making sure tid is a C long int.