TH: build and install in env-aware manner

The prefix has to remain constant, though, so this still doesn't make it
easy to guarantee reasonable immutability of the whole system.
TH: build with a correct username