Handle older macOS SDKs not defining TARGET_OS_OSX.
Handle older macOS SDKs not defining TARGET_OS_OSX.

Change-Id: I4a0566f3f1cb2d6320e3de80619aa90e0f53ff27
Reviewed-on: https://code-review.googlesource.com/c/re2/+/59690
Reviewed-by: Perry Lorier <d2756efe887c28699f4587ef278926ee3b3bfae5@google.com>
Reviewed-by: Paul Wankadia <62d4e38bb1380f055ec4b899baa75e52af09c5f7@google.com>

google/re2,google/re2,google/re2,google/re2,google/re2