An attempt at crossplatform DLL symbols

one day this code may be made into a shared library, so I got the
preprocessor work out of the way for symbol exports.