Builds on FreeBSD. Be very naughty and use /tmp as shared_memory_dir() for now.