Add new function for rendering json predictably on ruby 1.8.7