Support Mac OS X (and NetBSD)
Merge pull request #239 from MarkDBlackwell/feature_megatest2

Pull request for mega-test on Mac OS X (and NetBSD)