Fixed makefile so that it will run under MSYS

Some of the chmod commands in the makefiles test section fail to run
under MSYS on Windows.
Set the nmake file so that it generatesa lib with static runtime linking.