Fix DEBUG_THREADS on FreeBSD

There was a typo in an #include, furthermore FreeBSD has no
pthread_getname_np equivalent.

I added Sys_GetThreadName() so the code is a bit cleaner.
Merge pull request #51 from DanielGibson/debug-threads-freebsd

Fix DEBUG_THREADS on FreeBSD