Added "-Wl,--no-undefined" link flag.

This is to make sure that all symbols are defined when linking to
create a shared library object.

Also fixed up the config.h with macros to make it work for
both linux and windows.