Gracefully handle lower-case thread states on Linux

Thanks to @v-p-b for reporting.

Fixes #3.