Calculate struct size without sizeof().