Adds a link_with_pthread() CMake function to eliminate the conditionals used at the link site due to this link step being limited to UNIX but non-Android (because pthread is inside Bionic on Android where an explicit pthread request breaks the build).