fix windows mingw build.

Makefile were missing new files. The problems after that were mainly
hardcoding lib paths etc.