Fixed some export problems with Visual Studio build