Fix __declspec trouble

It seems in some cases, contrary to it's documentation, gcc lacks support for __declspec. this should fix that problem.