This error is caused by overzealous optimisation by Microsoft compilers. It is rather common for programs written in other compiler brands to encounter this. And indeed, masking out float exceptions is the recommended work-around. There is otherwise nothing you can do about it, apart from recompiling if you have the source. It also often happen with COM libraries. Afaik. it is only a problem with 32 bit dll's and only if the library is compiled by a Microsoft compiler.
What actually happens is that MS found it a good idea to use fpu registers as scratch on very high optimization settings, hence most Windows dll's just work since ms does usually not use those extreme optimizations themselves.
Also note as you observed: the code - in the dll - does not even have to have any floating point operations in it!