Added pkg-config file generation.
Removed the temporary `compat.h` header.
Made sgLibraryLoad play nicer in POSIXy systems.