minor bugfixes

I did pretty much everything wrong setting up my scene, so I noticed a few bugs in error handling. Also building the dll in windows required some changes in import/export declarations.