Implemented simplified build system in 64-bit linux

- Added scripts for compiling static libs and test code
- Fixed race condition on the nativeThreadMap that caused currentThread()
  to occasionally return NULL for a valid thread
- Added missing include statements to satisfy the stricter compiling environment
  under CentOS