Add threads, mutexes and math::init for NaCl. Fixed some of the linking problems for NaCl OpenAL.