SERVER-6246 Fix unused variable error in non-debug builds