added critical section to objectForKey:
updated Makefile for Xcode 5