refactoring http accept header for Sinatra 1.4.2+
adding Sinatra::Request.accept? method for pre-1.3.0