Add a -fwarn-dodgy-exports flag; fixes #1911