Ruby 1.9 compatibility

I swapped the keyword arguments with an options Hash to provide compatibility with Ruby 1.9.