Fixed a small bug in IndexField.hh (had to do with memcpy), and tried
to add some support for Mac OS