Small buildsys improvment

* Allow overriding the install prefix with the PREFIX variable (defaults
  to /usr/local).
* Allow to *not* run ldconfig, even on Linux, if RUN_LDCONFIG=0.

With these fixes, it is possible to build and install on NixOS, without
patching.

NOTE: I'm not touching the ./install.sh script (yet), because that has
many more anti-NixOS features.