tsan while used by golang's race detector was not working on alpine
linux, since it is using musl-c instead of glibc. Since alpine is very
popular distribution for container deployments, having working race
detector would be nice. This commits adds some ifdefs to get it working.
It fixes https://github.com/golang/go/issues/14481 on golang's issue
tracker.
Looking at the comment below, this seems to be a hard-earned bit of logic:
// EXEC_PAGESIZE may not be trustworthy.
Why do we need this change?