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 changes, it is possible to build and install on NixOS,
without patching.

NOTE: I'm not touching the ./install.sh script, because it is
fundamentally incompatible with NixOS (we'll use the package manager
instead).