changed pthread_self() to return thread IDs > 0
changed return value to 0 on lookup fail in pthread_self()
Merge pull request #1016 from BytesGalore/fix_cpp_pthread_id

posix:pthread c++11 changed pthread_self() to return thread IDs > 0
native: update support for FreeBSD

tested with FreeBSD 10.0

fixes: #505
fixup