Added MinGW+MSYS compatibility. Added basic unit test framework.