move shared memory workaround to ensure it only runs on linux travis