MSVC generation fixes

- Fix .a, .o files appears when run on Linux/Mac OS X
- Fix ExternalLibrary units crashed the generator

Closes GH-187