Measurements of B-meson lifetime ratios with the LHCb detector