This is a second attempt after D40100 induced racey crashes with ASan
(due to __android_log_write and the strncpy interceptor on API >= 21).
This new version checks the runtime API level to be <= ANDROID_KITKAT for
the use of __android_log_write, otherwise we use syslog, which should
conform with the previous behavior.
Unfortunately despite numerous efforts I couldn't reproduce the original
crashes in my environments so I couldn't test that the fix was actually