Attempt to make SDB more Windows-friendly.

This needs some actual testing.