port 'fix GlobalLock implementation' to old boost version
avoid gcc warning