Fixed bug during compilation with mingw

Fixed bug during compilation with mingw & improved git revision support for automatic up to date revision number.