Improved build process. Changes __synchronized_map and __synchronized_lock to static variables.