small corrections

fix mingw build file and fix the problem that crashes the client when
running in non server mode in windows with the commands getblocktemplate
and other commands