Implemented goat's changes to get gtest working in Windows

Debug mode on the .dll doesn't work quite yet.