Makefile should detect perf or fall back to time

If perf executable exists, use that when testing. Otherwise, just use `time`.