use the right type_map

Rails 4.1 removed the `TYPE_MAP` constant. This fix follows that change but still works on Rails 4.0.