Add windows compatability to ctest.

This is copying over some functionality from cstructs.
Add windows-compatible cstructs.

Again, this is copying over an update from the cstructs repo.