take compression rate into consideration when creating avatar

as mentioned here http://www.concrete5.org/developers/bugs/5-6-1-2/avatar-helper-doesnt-take-in-account-al_thumbnail_jpeg_compressi/
replaced constant with method form image helper
Merge pull request #1061 from Remo/patch-46

take compression rate into consideration when creating avatar