Do not use the System V shared memory functions when they are not available
Fixes a build failure on MinGW due to the shared functions being unsupported.
Also check for <sys/ipc.h> since that is where the IPC_* defines are.
Reported-by: https://github.com/CraftedCat
Reported-in: https://github.com/pst-format/libpst/issues/5