Merge of upstream changes and conversion of unit tests

I brought in the changes from the upstream mono branch that use preprocessor directives to switch native library names between .NET and Mono.  In order to test these changes, I converted the unit test project from MSTest to Nunit.