Fix problem with helper_method for ruby less than 2.1