Make sure that the sources get linked into the extension, and not the main PHP library

This took me litterally hours to find, with no helpful messages from
either the Windows linkers or compilers :-/
Fixed some warnings and make sure PG and EG can be accessed.