make PREFIX overridable in Makefile

Signed-off-by: Vanya Sergeev <vsergeev@gmail.com>
change install target to be more cross-platform in Makefile

GNU install: install -D
BSD install: install -d

A naive solution is to just use mkdir -p to create the bindir, then install to
that.

Signed-off-by: Vanya Sergeev <vsergeev@gmail.com>