Ruby 1.8.7 compatability

- replaced hash shorthand {key: value} by {:key => value}
- gsub does not accepts Hash as second parameter in Ruby <= 1.9.1
- Time.strptime does not exist in Ruby <= 1.9.2
- String.force_encoding does not exist prior to Ruby 1.9 and is only used in specs

Specs seem broken, but don't throw exceptions. To me it seems as if they were not working in the first place.