Use strings for modes for Ruby 2.X compatibility