Implement a warning message when building an dynamic library .so, .dll o...

...r a .dylib, which are currently not supported. Closes #2562.
I remember a discussion where someone commented to me along the lines of "but I can do -o x.so and it works, so why are you telling me it's not supported?", which triggered raising this issue in the first place.