A small patch to Rack to fix issues running Rails (3.x/4.x) on JRuby 1.7.4