MDL-42084 lib: fix undefined variable warnings