Fix date parsing to work on Ruby 1.8