Move all use-flag options to the configure and use the PTHREAD use flag created during check_cxx instead of the setting it explicitly