fix -Weffc++ warnings with Boost.ScopeGuard

Signed-off-by: Joshua Rubin <jrubin@zvelo.com>