Use => rather than : for 1.8.7 compatibility

I found I needed to make a couple of tiny changes for this to work with Ruby 1.8.7. (Sorry if I'm not doing this quite right - quite new to pull requests!)