Fix for santize flags only being used when compiled with shared.