build: Fix detection of DIR_ROOT.