fix macos shmget bug