Improve compile and link makefile options on Windows

The "-fPIC" option seems to be redundant on Windows and cause a compiler
warning.

The option "-static-libgcc" is added on Windows and the "dynamic link"
command is differentiated from the C compiler.
Fix type on Makefile for Windows build
Improve C/C++ optimization flags in Makefile