Fix test failures on OS X Mavericks w/Java 1.6 (issue #55)

For reasons I cannot fathom, one cannot get iterators for the keys in hashmaps under OS X Mavericks while using Java 1.6. I presume this is a Java 1.6 issue more than a Mavericks issue. However, toArray() works, so if the iterator fails, we can try using toArray.