NaCl runtime fixes

- fix compile/runtime issues caused by upstream changes
- add NaCl glibc support
- various changes to support running tests in NaCl glibc
  from 'make check'