Fix Helgrind failure with valgrind=1 make flag

Helgrind gets confused when mutexes are stack-allocated.
GCC 4.8 with -O0 got unlucky in its generated code, as false
negatives were reported.