[FIX] fixes export macro warnings

This pull request fixes a series of warnings caused by wrongly positioned export macros. I tested it also on windows to make sure that the changed/removed macros do not affect export/import on windows.