fix shared memory compilation errors