Add --gprof-support in configure

I did this to be able to do some profiling in https://bugzilla.gnome.org/show_bug.cgi?id=717960

See if maybe this can be useful in general.