Work around Android bugs.

Includes:
  * Check environ against NULL before using it, since Android sets it to
    NULL.
  * Cast st_size of struct stat to off_t. Android uses long long for
    st_size as its off_t is only 32 bit, but st_size should be off_t
    according to POSIX.
  * Android's strtod() does not accept 0x, as specified by C99. Thus,
    the test is disabled if __ANDROID__ is defined.