Ported to NetBSD (1/2): Replaced Linux-specific timer call

CLOCK_THREAD_CPUTIME_ID is a linux-specific timer. On NetBSD, the best
way to get timer information appears to be getrusage, which happens to
be fairly cross-platform.
Ported to NetBSD (2/2): Add casts for character class detection

NetBSD's character class test macros are defined such that they produce
a compiler warning when given a char argument. Adding a cast to the call
fixes this.
Merge pull request #99 from thequux/nbsd

Make build work on NetBSD