Fixes for unit tests breaking under Ruby 1.8.7.