Added option to compile and link against gprof.