Only use pthread_setname_np on Android >= 9 (2.3)

Older versions of Android don't have this function.
Merge pull request #1442 from mstorsjo/android-pthread-setname

Only use pthread_setname_np on Android >= 9 (2.3)