[sanitizer] Replace -lpthread with -pthread in tests.

-lpthread does not work on Android.