Check $XDG_STATE_HOME/nix/profile if ~/.nix-profile is not found as addressed in #837. Fix #837
detection/internal.h