deadlocks were caused by the inconsistent detection of pthreads by the
boost headers in different parts of the OOo build which resulted in an
uninitialized mutex.
- fix a few compile errors in the nas sub-project build.
General testing and patches from the community are encouraged.