Fixes gcc related stuff and fixes bug with custom command line

* Makes compatible with MinGW
  * Adds missing definitions
  * Uses dirty trick with dynamic DLL loading
* Fixes command line bug with empty output file name