Resolved ambiguous references to lock_guard.

These ambiguous references caused the build to fail on Apple's Clang (Apple
LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)).